import 'package:flutter/material.dart';

/// 根页面导航项模型 - Root Navigation Item Model
/// 
/// 定义底部导航栏每个选项的数据结构
/// Defines data structure for each bottom navigation bar option
class RootNavItem {
  /// 导航项标题 - Navigation item title
  String title;
  
  /// 导航项图标 - Navigation item icon
  IconData icon;
  
  /// 是否启用 - Whether enabled
  bool enabled;
  
  /// 徽章数量 - Badge count
  int? badgeCount;

  RootNavItem({
    required this.title,
    required this.icon,
    this.enabled = true,
    this.badgeCount,
  });

  @override
  bool operator ==(Object other) {
    if (identical(this, other)) return true;
    return other is RootNavItem &&
        other.title == title &&
        other.icon == icon &&
        other.enabled == enabled &&
        other.badgeCount == badgeCount;
  }

  @override
  int get hashCode {
    return title.hashCode ^
        icon.hashCode ^
        enabled.hashCode ^
        badgeCount.hashCode;
  }

  @override
  String toString() {
    return 'RootNavItem(title: $title, icon: $icon, enabled: $enabled, badgeCount: $badgeCount)';
  }
}